package com.plugin.dingding;

public class AjaxRet {
    private int code;
    private String msg;
    private Object data;

    public static AjaxRet success(Object obj){
        AjaxRet ret = new AjaxRet();
        ret.setCode(0);
        ret.setData(obj);
        return ret;
    }

    public static AjaxRet error(String msg){
        AjaxRet ret = new AjaxRet();
        ret.setCode(500);
        ret.setMsg(msg);
        return ret;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
